# -*- coding: utf-8 -*-
import tornado.web
from setting import settings

import datetime
class MainHandler(tornado.web.RequestHandler):
    @property
    def db(self):
        return self.application.db
    @property
    def curr_now(self):
	    return datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
    #send mail

    def get(self):
        method = self.get_argument('m', 'default')
        getattr(self, 'get_' + method)()

    def post(self):
        method = self.get_argument('m', 'default')
        getattr(self, 'post_' + method)()

    def get_default(self):
       # print self.curr_now
        self.render("index.html",message = u"")
    def get_index(self):
       # print self.curr_now
        self.render("index.html",message = u"")
